-
Notifications
You must be signed in to change notification settings - Fork 3.3k
fix(workflow): update container dimensions on keyboard movement #3043
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile OverviewGreptile SummaryThis PR fixes a bug where containers weren't properly resizing when child nodes were moved using keyboard navigation. The fix renames Key changes:
The implementation is clean and follows the existing patterns in the codebase. Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant ReactFlow
participant onNodesChange
participant onNodeDrag
participant updateContainerDimensionsDuringMove
participant DisplayNodes
Note over User,DisplayNodes: Keyboard Movement Scenario
User->>ReactFlow: Press arrow key to move node
ReactFlow->>onNodesChange: NodeChange (type: position, dragging: false)
onNodesChange->>onNodesChange: Apply node changes
onNodesChange->>onNodesChange: Check if position change && !dragging
onNodesChange->>updateContainerDimensionsDuringMove: Update container with new position
updateContainerDimensionsDuringMove->>DisplayNodes: Resize container to fit children
Note over User,DisplayNodes: Mouse Drag Scenario
User->>ReactFlow: Drag node with mouse
ReactFlow->>onNodeDrag: Node drag event
onNodeDrag->>onNodeDrag: Check if node has parent container
onNodeDrag->>updateContainerDimensionsDuringMove: Update container with drag position
updateContainerDimensionsDuringMove->>DisplayNodes: Resize container during drag
ReactFlow->>onNodesChange: NodeChange (type: position, dragging: true)
onNodesChange->>onNodesChange: Apply node changes
onNodesChange->>onNodesChange: Check if position change && !dragging (false, skip)
Note over onNodesChange,updateContainerDimensionsDuringMove: Duplicate call prevented by !dragging check
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 file reviewed, 1 comment
5680fa0 to
b4f9072
Compare
|
@greptile |
Add !change.dragging check to only handle keyboard movements in onNodesChange, since mouse drags are already handled by onNodeDrag.
81cd857 to
7c0952d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 file reviewed, no comments
Keyboard arrow key movements now call collaborativeBatchUpdatePositions to sync position changes to the backend for persistence and real-time collaboration.
f97021f to
5e9d9d5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
…Ds (#3044) * improvement(cmdk): refactor search modal to use cmdk + fix icon SVG IDs * chore: remove unrelated workflow.tsx changes * chore: remove comments * chore: add devtools middleware to search modal store * fix: allow search data re-initialization when permissions change * fix: include keywords in search filter + show service name in tool operations * fix: correct filterBlocks type signature * fix: move generic to function parameter position * fix(mcp): correct event handler type for onInput * perf: always render command palette for instant opening * fix: clear search input when modal reopens
…atibility (#3046) * fix(helm): move rotationPolicy under privateKey for cert-manager compatibility * docs(helm): add reclaimPolicy Retain guidance for production database storage * fix(helm): prevent empty branding ConfigMap creation
Check isInDragOperation before persisting in onNodesChange to prevent duplicate calls. Drag-end events have dragStartPosition still set, while keyboard movements don't, allowing proper distinction.
3f8b1a7 to
f9c793d
Compare
Summary
updateContainerDimensionsDuringDragtoupdateContainerDimensionsDuringMoveto reflect broader usageonNodesChangeto resize containers when child nodes are moved via keyboard arrowsType of Change
Testing
Tested manually
Checklist